package yh;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * @Auther:云尚学Java
 * 主要用来复习JDBC相关技术
 */
public class Demo {
    public static void main(String[] args) {

    }
    public static void createTable(){
        try {
            //1.加载数据库驱动包
            Class.forName("com.mysql.cj.jdbc.Driver");
            //2.获取数据库连接对象
            Connection connection= DriverManager.getConnection("jdbc:mysql://localhost:3306/test");
            System.out.println("连接数据库成功！"+connection);
        } catch (ClassNotFoundException | SQLException e) {
            e.printStackTrace();
        }

    }

}
